const express = require("express");
const router = express.Router();

const { deliveryData, deliveryPositionList, deliveryCurrentComm, deliveryCommHistory, deliveryHistoryPosition, deliveryTransactionRecord, deliveryCapitalFlow } = require('../../data/mockData.js')

router.get("/data/basic/delivery", (req, res) => {
    res.success({ data: deliveryData });
});

// 仓位
router.get("/delivery/position/list", (req, res) => {
    // console.log(req.query, "req");

    res.success({
        data: deliveryPositionList,
    });
});

// 历史仓位
router.get("/delivery/history/position", (req, res) => {
    // console.log(req.query, "req");

    res.success({
        data: deliveryHistoryPosition,
    });
});

// 当前委托
router.get("/delivery/current/commission", (req, res) => {
    // console.log(req.query, "req");

    res.success({
        data: deliveryCurrentComm,
    });
});

// 历史委托
router.get("/delivery/commission/history", (req, res) => {
    // console.log(req.query, "req");

    res.success({
        data: deliveryCommHistory,
    });
});

// 成交记录
router.get("/delivery/transaction/record", (req, res) => {
    // console.log(req.query, "req");

    res.success({
        data: deliveryTransactionRecord,
    });
});

// 资金流水
router.get('/delivery/capital/flow', (req, res) => {
    // console.log(req.query, "req");

    res.success({
        data: deliveryCapitalFlow,
    });
})




module.exports = router